{% load static %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>数据分析案例</title>
    <base href="/">
    <link rel="SHORTCUT ICON" href="../static/img/icon.png">
    <link rel="stylesheet" type="text/css" href="../static/css/index.css"/>
    <link rel="stylesheet" type="text/css" href="../static/css/footer.css"/>
    <link rel="stylesheet" type="text/css" href="../static/css/dataAnalysis.css"/>
    <link rel="stylesheet" type="text/css" href="../static/css/shCoreDefault.css"/>
    <script type="text/javascript" src="../static/js/shCore.js"></script>
    <script type="text/javascript" src="../static/js/jquery.1.4.2-min.js"></script>
    <style>
        a {
            text-decoration: none;
        }


        body {
            background: #F6F8FA;
        }

        .main_box {
            background: #FFF;
            margin-top: 20px;
            width: 840px;
            margin-left: 50px;
        {#height: 500px;#} height: auto;
        }

        .nav {
            background-color: #34495e;
            height: 80px;
            width: 1330px;
            margin-left: 5px;
            margin-right: 5px;

        }

        .footer {
            width: 1330px;
            background-color: #34495e;
            margin-top: 5px;
            height: 80px;
            margin-left: 7px;
            margin-bottom: 5px;
        }

        .logo {
            width: 250px;
            height: 80px;
            background-color: #aee6a6;
            margin-left: 10px;
        }

        .logo img {
            width: 250px;
            height: 80px;
        }

        .post-right {
            background-color: #FFF;
            height: auto;
            width: 350px;
            float: right;
            position: absolute;
            top: 90px;
            margin-left: 920px;
        }

        .post-right-title {
            margin-top: 5px;
            margin-left: 15px;
        }

        .article-content {
            font: 16px/30px "Microsoft Yahei";
            line-height: 3;
            font-size: 16px;
            word-break: break-all;
            word-wrap: break-word;
            margin: 50px 0 20px 0;
            color: #2a2a2a;
            padding-left: 20px;
            padding-right: 20px;

        }

        .post-right ul {
            clear: both;
            overflow: hidden;
        }

        .post-right ul li {
            width: 48%;
            height: 100px;
            margin-bottom: 50px;
        {#background: #b9ebe6;#} float: left;
        }

        .post-right ul li:nth-child(even) {
            margin-left: 4%;
        }

        .hot_content {
            margin-top: 15px;
            margin-left: 10px;
            margin-right: 10px;
        }

        .hot_title {
        {#background-color: #c9302c;#} margin-top: 5px;
            height: 48px;
        }

        .hot_title a {
            color: #1F1F1F;
        }

        .hot_title a:hover {
            color: #2396ff;
        }

        .hot_img {
        {#background-color: #5cb85c;#}
        }

        .hot_img img {
            width: 158px;
            height: 90px;
        }

        .content_title {
            margin-top: 50px;
            font-size: 28px;
            margin-left: 10px;
        }

        .article-meta {
        {#background-color-color: #4445;#} margin-left: 18px;
            margin-top: 20px;
            font-size: 14px;
            margin-bottom: 30px;
        {#color: #504c4c;#}
        }

        .article-meta span {
            color: #1F1F1F;
        }

        .next_article {
        {#background-color: #5cb85c;#}{#color: #0005;#} margin-left: 15px;
            padding-bottom: 10px;
        }

        .next_article a {
            color: #3498DB;
        }

        .next_article a:hover {
            color: #3332ff;
        }

        .like_article {
            background-color: #fff;
            height: 100%;
            margin-top: 8px;
            width: 846px;
            margin-left: 50px;
            margin-bottom: 10px;
        }

        .like_content1 {
            background-color: #ffffff;
            padding-left: 10px;
            padding-right: 10px;
            padding-top: 10px;
            height: 100%;
            margin-bottom: 10px;
        }

        .like_content1 ul {
            overflow: hidden;
            margin-left: -10px;
        }

        .like_content1 ul li {
            width: 33.3333%;
            height: 200px;
            float: left;
            padding-left: 10px;
            box-sizing: border-box;
            margin-bottom: 5px;
        }

        .comment {
            padding-left: 10px;
            margin-bottom: 5px;
            padding-bottom: 5px;
        }

        .comment ul li {
            height: auto;
            padding-left: 10px;
        }

        .comment li {
        {#background-color: red;#}
        }

        .comment li:hover {
            background-color: #f5f9e3;
            cursor: pointer;
        }

        .like_content1 ul li .com {
            height: inherit;
            background: skyblue;
        }

        .like_content {
            height: 100%;
        }

        .like_title {
            padding-left: 10px;
            margin-bottom: 10px;
        }

        .like_title h1 {
            font-size: 16px;
            font-weight: bold;

        }

        .like_img {
            width: 264px;
            height: 155px;
            background-color: #e6191944;
        }

        .show_img img {
            width: 264px;
            height: 160px;
        }

        .title {
            margin-top: 5px;
            color: #1F1F1F;
            margin-bottom: 5px;
        }

        .title a {
            color: #09b8ff;
        }

        .title a:hover {
            color: #3332ff;
        }

        .article_content {
            width: 840px;
            background-color: #fff;
            margin-top: 7px;
            height: auto;
            margin-left: 7px;
        }

        .main-middle1 {
            height: auto;
            background-color: #F1F1F1;
            margin-top: -38px;
            margin-left: 7px;
            margin-right: 12px;
        }

        .main_content {
            background: #FFF;
            margin-top: 20px;
            width: 840px;
            margin-left: 50px;
            height: auto;
        }

        .comment-list ul li {
            list-style: none;
            margin: 0;
        }

        .submit_comm {
            background: #5899d0;
            border-radius: 3px;
            visibility: visible;
            padding: 8px 18px;
            border-bottom-color: #2B562B;
            font-size: 14px;
            font-weight: 700;
            cursor: pointer;
            text-decoration: none;
            color: #FFF;
            text-shadow: 0 1px 0 #5d4113;
            border: none;
        }

        .submit_comm:hover {
        {#color: #f0f9f9;#} background-color: #807ff9;
        }

        .comment input {
            outline-style: none;
            border: 1px solid #ccc;
            border-radius: 4px;
            padding: 5px 5px;
            width: 150px;
            font-size: 14px;
            font-weight: 300;
        }

        input:focus {
            border-color: #66afe9;
            outline: 0;
            -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
            box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6)
        }

        .comm_img {
            width: 60px;
            margin-top: 15px;
        }

        .comm_img img {
            height: 50px;
            width: 50px;
            border-radius: 50%;
        }

        .comm_right {
            margin-left: 60px;
            margin-top: -45px;
        }
    </style>
</head>
<body>
{% include 'base.html' %}
<div class="main-middle1">
    <div class="main_content">
        <div class="article_content">
            <div class="content_title">
                <h1 class="content_title">{{ show.title }}</h1>
            </div>
            <div class="article-meta">
                <span class="item">分类：<a href="{% url 'index' %}blog/list{{ show.category.id }}"
                                         rel="category tag" style="color:#000;">{{ show.category.nama }}</a></span>&nbsp;&nbsp;
                <span class="item">作者：{{ show.user }}</span>&nbsp;&nbsp;
                <span class="item">浏览：{{ show.views }}</span>&nbsp;&nbsp;
                <span class="item">发表于：{{ show.created_time }}</span>

            </div>
            <article class="article-content">
                <p>
                    {{ show.body|safe }}
                </p>
            </article>
            <div class="next_article">
                <div><b>上一篇：</b>
                    {% if next_blog %}
                        <a href="blog/show{{ next_blog.pk }}" class="article-tag">{{ next_blog }}</a>
                    {% else %}
                        没有了
                    {% endif %}


                </div>
                <div><b>下一篇：</b>
                    {% if previous_blog %}
                        <a href="blog/show{{ previous_blog.pk }}" class="article-tag">{{ previous_blog }}</a>
                    {% else %}
                        没有了
                    {% endif %}
                </div>
            </div>
        </div>
    </div>
    {#评论#}
    <div class="like_article">
        <div class="like_content">
            <div class="comment-title">
                <p style="font-size: 20px;padding-left: 10px">发表评论</p><br>
            </div>
            <div class="comment">
                <form action="{% url 'index' %}comm/comment{{ show.id }}" method="post" class="comment-form">
                    {% csrf_token %}
                    <table border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td>名字：</td>
                            <td><input type="text" required placeholder="20字符以内" maxlength="24" style="width: 190px"
                                       name="comm_name"/>&nbsp;&nbsp;
                            </td>
                            <td>邮箱：</td>
                            <td><input type="text" required placeholder="请输入正确的邮箱" maxlength="50" style="width: 190px"
                                       name="comm_email"/></td>
                        </tr>
                    </table>
                    <textarea style="margin-top: 5px;margin-bottom: 3px;font-size: 14px;font-weight: 300;" required rows="4"
                              maxlength="200" cols="70" name="text"
                              placeholder="请输入留言内容，200字以内"></textarea><br>
                    <input type="submit" value="发表留言" class="submit_comm"/><br>
                    <span style="color: red;font-size: 18px;">{{ err_message }}</span>
                    <span style="color: #00e200;font-size: 18px">{{ message }}</span><br>
                    {#                    {% if messages %}#}
                    {#                        <script>#}
                    {#                            {% for msg in messages %}#}
                    {#                                alert('{{ msg.message }}');#}
                    {#                            {% endfor %}#}
                    {#                        </script>#}
                    {#                    {% endif %}#}
                </form>
                <div class="comment-list">
                    <p style="font-size: 17px;">评论列表，共 <span>{{ comm_count }}</span> 条评论</p>
                    <ul>
                        {% for comment in comment_list %}
                            <li>
                                <div class="comment-list1">
                                    <div class="comm_img">
                                        <img src="../static/img/current_user.jpg" alt="">
                                    </div>
                                    <div class="comm_right">
                                        <span style="font-size: 12px;">{{ comment.name }}</span>
                                        <time class="submit-date" style="font-size: 12px;"
                                              datetime="2012-11-09T23:15:57+00:00">{{ comment.created_time }}
                                        </time>
                                        <div>
                                            {{ comment.text }}
                                        </div>
                                    </div>
                                </div>
                            </li>
                        {% empty %}
                            暂无评论
                        {% endfor %}
                    </ul>
                </div>
                </section>
            </div>
        </div>
    </div>
    {#评论#}
    <div class="like_article">
        <div class="like_content">
            <div class="like_title">
                <h1 class="like_title1">你可能感兴趣的</h1>
            </div>
            <div class="like_content1">
                <ul>
                    {% for h in hot %}
                        <li>
                            <div class="like_img">
                                <a href="{% url 'index' %}blog/show{{ h.id }}">
                                    <div class="show_img">
                                        <img src="{% url 'index' %}media/{{ h.img }}" alt="" title="{{ h.title }}"/>
                                    </div>
                                </a>
                                <div class="title">
                                    <a href="{% url 'index' %}blog/show{{ h.id }}">{{ h.title }}</a>
                                </div>
                            </div>
                        </li>
                    {% endfor %}
                </ul>
            </div>
        </div>
    </div>

    <div class="post-right">
        <div class="post-right-title">
            <p>热门推荐</p>
        </div>
        <div class="hot_content">
            <ul>
                {% for h in hot %}
                    <li>
                        <div class="hot_img">
                            <a href="{% url 'index' %}blog/show{{ h.id }}"><img src="media/{{ h.img }}" alt=""
                                                                                title="{{ h.title }}"/></a>
                        </div>
                        <div class="hot_title"><a
                                href="{% url 'index' %}blog/show{{ h.id }}">{{ h.title | slice:":18" }}</a></div>
                    </li>
                {% endfor %}
            </ul>
        </div>
    </div>
</div>
<div class="footer">
    <footer style="border-top: 1px solid ; background-repeat: repeat;"
            class="footer">
        <div class="footer-inner">
            <div class="fooert copyright" align="center">
                <a href="##" target="_blank">友情链接：</a>
                <a href="https://www.django.cn/" target="_blank">Django中文网</a>
                | <a href="https://www.runoob.com/" target="_blank">菜鸟教程</a>
                | <a href="http://pyecharts.org/#/zh-cn/" target="_blank">pyecharts</a> |
                <a href="http://sc.chinaz.com/tag_jiaoben/tupianlunbo.html" rel="sitemap">站长素材</a>
                | <a href="##" target="_blank">联系我们</a>
                <p><a href="/" title="dry">dry</a> 版权所有，保留一切权利 ! <a href="https://www.kkkuu.cn/">首页</a> © 2019-2020 ·
                    黔ICP备00000000号</p>
            </div>
    </footer>
</div>
<script src="../static/js/index.js"></script>
<script type="text/javascript" src="../static/js/scrolltopcontrol.js"></script>
<script>
    SyntaxHighlighter.all();//执行代码高亮
</script>
</body>
</html>